var $;
var table;
var layer;
var form;
layui.use(['table','element','layer','form','laydate'],function() {
    $ = layui.jquery;
    table = layui.table;
    layer = layui.layer;
    form = layui.form;
    var laydate = layui.laydate;

    //日期
    laydate.render({
        elem: '#createDate'
        ,type:'date'
        ,trigger:'click'
        ,range: '~'
    });

    $("#btn1").on('click',function(){
        location.reload();
    });

    $("#btn2").on('click',function(){
        var date=$("#createDate").val();
        var str=date.substr(0,10);//开始时间
        var str2=date.substr(13,10);//结束时间
        //传参给父页面
        parent.$("#uphone").val($("#phone").val());
        parent.$("#createDate").val(str);
        parent.$("#createDate2").val(str2);
        parent.$("#articleLike").val($("#articleLike").val());
        parent.$("#collectNum").val($("#collectNum").val());
        parent.$("#articleHits").val($("#articleHits").val());
        parent.$("#articleShare").val($("#articleShare").val());

        parent.setTab();
        var index=parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    });
});